<?php

namespace app\wework\controller;

use app\BaseController;
use app\Request;
use think\facade\Cache;
use app\wework\lib\src\WXBizMsgCrypt;
use app\wework\lib\utils\HttpUtils;
use app\wework\lib\api\CorpAPI;

/**
 * 页面控制器
 */
class User extends BaseController
{
	public function index(request $request)
    {
        // 实例化 API 类
        $api = new CorpAPI(config('wework.corpId'), config('wework.corpsecret'));

        try {
            // 获取User
            $user = $api->UserIdList(1);

            dump($user);
            exit;
        } catch (\Exception $e) {
            echo $e->getMessage() . "\n";
            exit;
        }
    }
}
